// core-decorators 第三方库使用示例
// 只读方法
import { readonly } from 'core-decorators'
class Person {
    @readonly
    name() {
        return 'zhang'
    }
}
let p = new Person()
alert(p.name())
// p.name = function () { }  // 此处会报错


// 已经废弃的方法进行提示
import { deprecate } from 'core-decorators';
class Person {
  @deprecate
  facepalm() {}

  @deprecate('We stopped facepalming')
  facepalmHard() {}

  @deprecate('We stopped facepalming', { url: 'http://knowyourmeme.com/memes/facepalm' })
  facepalmHarder() {}
}
let person = new Person();

person.facepalm();
// DEPRECATION Person#facepalm: This function will be removed in future versions.

person.facepalmHard();
// DEPRECATION Person#facepalmHard: We stopped facepalming

person.facepalmHarder();
// DEPRECATION Person#facepalmHarder: We stopped facepalming
//
//     See http://knowyourmeme.com/memes/facepalm for more details.
